<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>列表页面</title>
</head>
<body class="laytp-container">
<div id="search-form" style="display:none;">
    <div class="layui-layer-title">搜索</div>
    <form class="layui-form search-form-body" lay-filter="layui-form" style="margin-top:20px;">
        <div class="layui-form-item layui-inline">
                    <label class="layui-form-label" title="ID">ID</label>
                    <div class="layui-input-inline">
                        <input autocomplete="off" type="text" id="id" name="search_param[id][value]" placeholder="请输入ID" class="layui-input">
                        <input type="hidden" name="search_param[id][condition]" value="=">
                    </div>
                </div>

        <div class="layui-form-item layui-inline">
                <label class="layui-form-label" title="试卷名称">试卷名称</label>
                <div class="layui-input-inline">
                    <input autocomplete="off" type="text" id="name" name="search_param[name][value]" placeholder="请输入试卷名称" class="layui-input">
                    <input type="hidden" name="search_param[name][condition]" value="LIKE">
                </div>
            </div>

			<div class="layui-form-item layui-inline">
                <label class="layui-form-label" title="分类">分类</label>
                <div class="layui-input-inline">
                    <div class="xmSelect"
                        data-name="search_param[category_id][value]"
                        data-sourceType="route"
                        data-source='/admin.category/index'
                        data-sourceTree="false"
                        data-paging="true"
                        data-valueField="id"
						data-textField="name"
						data-placeholder="请选择分类"
						data-direction="down"
                    ></div>
                    <input type="hidden" name="search_param[category_id][condition]" value="FIND_IN_SET">
                </div>
            </div>

			<div class="layui-form-item layui-inline">
                <label class="layui-form-label" title="课程">课程</label>
                <div class="layui-input-inline">
                    <div class="xmSelect"
                        data-name="search_param[course_id][value]"
                        data-sourceType="route"
                        data-source='/admin.course/index'
                        data-sourceTree="false"
                        data-paging="true"
                        data-valueField="id"
						data-textField="name"
						data-placeholder="请选择课程"
						data-direction="down"
                    ></div>
                    <input type="hidden" name="search_param[course_id][condition]" value="FIND_IN_SET">
                </div>
            </div>

			<div class="layui-form-item layui-inline">
                <label class="layui-form-label" title="创建人">创建人</label>
                <div class="layui-input-inline">
                    <div class="xmSelect"
                        data-name="search_param[user_id][value]"
                        data-sourceType="route"
                        data-source="/admin.user/index"
                        data-sourceTree="false"
                        data-paging="true"
                        data-valueField="id"
                        data-textField="nickname"
                        data-placeholder="请选择创建人"
                    ></div>
                    <input type="hidden" name="search_param[user_id][condition]" value="FIND_IN_SET">
                </div>
            </div>

			<div class="layui-form-item layui-inline">
                <label class="layui-form-label" title="状态">状态</label>
                <div class="layui-input-inline">
                    <select id="status" name="search_param[status][value]">
                        <option value="">请选择状态</option>
                        <option value="0">待审核</option>
						<option value="1">发布</option>
                    </select>
                    <input type="hidden" name="search_param[status][condition]" value="=">
                </div>
            </div>

        <div class="bottom">
            <div class="button-container">
                <button class="laytp-btn laytp-btn-primary laytp-btn-sm" lay-submit="" lay-filter="laytp-search-form">
                    <i class="layui-icon layui-icon-ok"></i>
                    提交
                </button>
                <button type="button" class="laytp-btn laytp-btn-sm laytp-search-form-reset">
                    <i class="layui-icon layui-icon-refresh"></i>
                    重置
                </button>
            </div>
        </div>
    </form>
</div>
<div class="layui-card">
    <div class="layui-card-body">
        <table id="laytp-table" lay-filter="laytp-table"></table>
    </div>
</div>

<script type="text/html" id="default-toolbar">
    {{# if(facade.hasAuth("/admin.exam.papers/edit") || facade.hasAuth("/admin.exam.papers/del")){ }}
    <div class="dropdown-menu">
        <button class="laytp-btn laytp-btn-primary laytp-btn-md">
            <i class="layui-icon layui-icon-triangle-d"></i>
            批量操作
        </button>
        <ul class="dropdown-menu-nav layui-anim-upbit dropdown-bottom-left layui-anim">
            <div class="dropdown-anchor"></div>
            {{# if(facade.hasAuth("/admin.exam.papers/edit")){ }}
            <li><a lay-event="edit"><i class="layui-icon layui-icon-edit"></i>编辑</a></li>
            {{# } }}
            {{# if(facade.hasAuth("/admin.exam.papers/del")){ }}
            <li><a lay-event="del"><i class="layui-icon layui-icon-delete"></i>删除</a></li>
            {{# } }}

        </ul>
    </div>
    {{# } }}
    {{# if(facade.hasAuth("/admin.exam.papers/add")){ }}
    <button class="laytp-btn laytp-btn-danger laytp-btn-md" lay-event="add">
        <i class="layui-icon layui-icon-add-1"></i>
        新增
    </button>
    {{# } }}
    <button class="laytp-btn laytp-btn-warming laytp-btn-md" lay-event="search">
        <i class="layui-icon layui-icon-search"></i>
        搜索
    </button>
    {{# if(facade.hasAuth("/admin.exam.papers/recycle")){ }}
    <button class="laytp-btn laytp-btn-success laytp-btn-md" lay-event="recycle">
        <i class="layui-icon layui-icon-delete"></i>
        回收站
    </button>
    {{# } }}
</script>

<script type="text/html" id="default-bar">

    {{# if(facade.hasAuth("/admin.exam.papers/autoPaper")){ }}
    <button class="laytp-btn laytp-btn-warming laytp-btn-xs" lay-event="autoPaper"><i class="layui-icon layui-icon-normal"></i>自动组卷</button>
    {{# } }}
    {{# if(facade.hasAuth("/admin.exam.papers/exportPaper")){ }}
    <button class="laytp-btn laytp-btn-primary laytp-btn-xs" lay-event="exportPaper"><i class="layui-icon layui-icon-normal"></i>导出试卷</button>
    {{# } }}
    {{# if(facade.hasAuth("/admin.exam.papers/questionList")){ }}
    <button class="laytp-btn laytp-btn-normal laytp-btn-xs" lay-event="list"><i class="layui-icon layui-icon-normal"></i>试题详情</button>
    {{# } }}

    {{# if(facade.hasAuth("/admin.exam.papers/edit")){ }}
    <button class="laytp-btn laytp-btn-primary laytp-btn-xs" lay-event="edit"><i class="layui-icon layui-icon-edit"></i>编辑</button>
    {{# } }}
    {{# if(facade.hasAuth("/admin.exam.papers/del")){ }}
    <button class="laytp-btn laytp-btn-danger laytp-btn-xs" lay-event="del"><i class="layui-icon layui-icon-delete"></i>删除</button>
    {{# } }}


</script>

<script>
    if(localStorage.getItem("staticDomain")){
        document.write("<link rel='stylesheet' href='" + localStorage.getItem("staticDomain") + "/component/laytp/css/laytp.css?v=" + Date.now() + "'>");
        document.write("<script src='" + localStorage.getItem("staticDomain") + "/component/layui/layui.js?v=" + Date.now() + "'><\/script>");
        document.write("<script src='" + localStorage.getItem("staticDomain") + "/component/laytp/layuiConfig.js?v=" + Date.now() + "'><\/script>");
        document.write("<script src='" + localStorage.getItem("staticDomain") + "/admin/js/exam/papers.js?v=" + Date.now() + "'><\/script>");
    }else{
        document.write("<link rel='stylesheet' href='/static/component/laytp/css/laytp.css?v=" + Date.now() + "'>");
        document.write("<script src='/static/component/layui/layui.js?v=" + Date.now() + "'><\/script>");
        document.write("<script src='/static/component/laytp/layuiConfig.js?v=" + Date.now() + "'><\/script>");
        document.write("<script src='/static/admin/js/exam/papers.js?v=" + Date.now() + "'><\/script>");
    }
</script>


</body>
</html>